
#ifndef ADC_H_
#define ADC_H_


#include "include.h"



#define ADC_ClockCmd()  do{RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1,ENABLE);}while(0)
#define ADC_DataBufferLength   (u8)(3u)

#define ADC_BufferLength  (u8)(10u)

typedef struct
{
	u8 u8Index;
	u8 u8BufferCnt;
	u16 u16CurSampValBuffer[ADC_BufferLength];
	u16 u16VolSampValBuffer[ADC_BufferLength];
	u16 u16TempSampValBuffer[ADC_BufferLength];
	u16 u16CurSampAverageVal;
	u16 u16VolSampAverageVal;
	u16 u16TempSampAverageVal;
	u32 u32CurSampSumVal;
	u32 u32VolSampSumVal;
	u32 u32TempSampSumVal;
}Adc_FIFOType;

extern void Adc_GetSampVal(void);
extern void Adc_Config(void);
#endif






